#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    //setAutoFillBackground(true);
    ui->lineEdit->setClearButtonEnabled(true);
    ui->lineEdit_2->setClearButtonEnabled(true);

}

MainWindow::~MainWindow()
{
    delete ui;
}

/*
void MainWindow:: paintEvent(QPaintEvent *event)
{
    QPainter painter(this);
    painter.drawPixmap(rect(),QPixmap("G:/daima/qt/jiaotong/jiaotong","JPG"),QRect());
}
*/

void MainWindow::on_pushButton_clicked()// 登录按钮
{
    iptwindow *w=new iptwindow;
    QMessageBox::information(this,tr("成功!"),tr("登录成功!"));
    w->show();
    this->close();
}


void MainWindow::on_pushButton_2_clicked()// 退出按钮
{
    this->close();

    /*double x=1,y=2,z=3,f=3,m=4,n=6;
    //QString a="a",b="b",c="c",d="d",e="e",o="o";
    QString city,ssid;
    Graph<QString> g;
    g.InsertV(tr("郑州"));
    g.InsertV(tr("北京"));
    g.InsertV(tr("太原"));
    g.InsertV(tr("合肥"));
    g.InsertV(tr("济南"));
    g.InsertV(tr("西安"));
    g.InsertE("郑州","武汉",x,x,x,"ae");
    g.InsertE("郑州","太原",y,y,y,"ab");
    g.InsertE("郑州","合肥",n,n,n,"ad");
    g.InsertE("武汉","合肥",m,m,m,"de");
    g.InsertE("济南","西安",x,x,x,"bc1");
    g.InsertE("西安","太原",z,z,z,"bc2");
    g.InsertE("武汉",tr("北京"),x,x,x,"ec");

    //g.DeleteE(d,e);
    //g.show();
    //qDebug()<<a.toDouble();
    g.djst_traintime("郑州","合肥",city,ssid);
    g.djst_planetime("郑州","合肥",city,ssid);
    g.djst_cost("郑州","合肥",city,ssid);
    qDebug()<<city;
    qDebug()<<ssid;*/
}

